<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>POS收单运营管理平台</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link href="<s:url value="/css/a.css"/>" type="text/css"
	rel="stylesheet" />
<link href="<s:url value="/css/index.css"/>" type="text/css"
	rel="stylesheet" />


<script type="text/javascript"
	src="<s:url value="/js/jquery-1.9.1.min.js" />"></script>
<script type="text/javascript"
	src="<s:url value="/js/jquery.validate.min.js" />"></script>
<script type="text/javascript"
	src="<s:url value="/js/pwms.validate.js?v13" />"></script>
<script language="javascript" type="text/javascript"
	src="<s:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>

<style type="text/css">
.fieldError {
	color: red;
	text-align: left;
}

.error {
	float: none;
	color: red;
	padding-left: .5em;
	vertical-align: top;
}

table th {
	font-weight: bolder;
	text-align: left;
	background-color: #5599FF;
}
</style>
<script type="text/javascript">

		
	$(document).ready(function() {
		
		$("#orgForms").validate({
			debug : true,
			submitHandler : function(form) {
				form.submit();
			},
			rules : {
				"org.org_name" : {required : true},
				"upload" : {required : true},
				"org.org_address" : {required : true}

			},
			messages : {
				"org.org_name" :{required: "必填"},
				"upload" : {required: "必选"},
				"org.org_address" : {required: "必填"}
				
			},errorPlacement: function(error, element) { 
			    if ( element.is(":radio") ) 
			        error.appendTo ( element.parent() ); 
			    else if ( element.is(":checkbox") ) 
			        error.appendTo ( element.parent() ); 
			    else if ( element.is("input[name=captcha]") ) 
			        error.appendTo ( element.parent() ); 
			    else 
			        error.insertAfter(element); 
			} 

		});
		                                                
	});
	function delereRules(){
		$("#accountNo").rules("remove", "required"); 
		$("#files").rules("remove", "required"); 
		$("#remards").rules("remove", "required");  
		$("#add").rules("remove", "required"); 
	}
	function returnButton(){
		$("#orgForms").attr("action","search.ct");
		delereRules();
		$("#orgForms").submit();
	}
</script>

</head>

<body>
	
		<div class="subpage">
			<s:form namespace="/pages" action="edit_org.ct" method="post"
				cssClass="cmxform" id="orgForms" theme="simple" enctype="multipart/form-data">
				<div class="user_title">
					<h2 class="headline-inquires">
						POS收单运营管理平台<br />
						<span class="sub-title"></span>
					</h2>
				</div>
				<table width="100%" border="1" cellspacing="0" class="table">
					<tr>
						<td colspan="4" align="center">

							<h2 class="headline-inquires">
								机构基本信息修改<br />
								<span class="sub-title"></span>
							</h2>
						</td>
					</tr>
					<tr>
						<th colspan="4">机构基本信息</th>
					</tr>
					<tr>
						<td align="right" width="15%">机构名称：</td>
						<td width="35%">
						<s:hidden name="org.id"></s:hidden>
						<s:hidden name="org.org_code"></s:hidden>
						<s:textfield cssClass="queryWidth" id="accountNo" name="org.org_name" maxlength="100"></s:textfield>
							<font color="red">*</font> <span id="testDIV"></span></td>
						
					</tr>
                    
					
					<tr>
						<td align="right">logo图片：</td>
						<td colspan="3">
						<s:file id="files" name="upload" required="true"></s:file>
						<font
							color="red">*</font></td>
					</tr>
					<tr>
						<td align="right">详细地址：</td>
						<td colspan="3"><s:textfield name="org.org_address"
								id="add" cssStyle="width:95%;" maxlength="100"></s:textfield><font
							color="red">*</font></td>
					</tr>
					<tr>
						<td align="right">备注：</td>
						<td colspan="3"><s:textarea rows="5" id="remards"  cssStyle="width:95%;"
								name="org.remark" /></td>

					</tr>
					
					
					
					<tr>
						<td colspan="4" align="center"><span style="color: red"><s:actionerror /></span>
							<span style="color: red;"><s:actionmessage /></span > <span style="color: red;"><s:fielderror
									cssClass="fieldError" /></span>
							<span id="otherError"></span>
						</td>
					</tr>
					<tr>
						<td align="center" colspan="4"><s:submit id="btnAdd"value="保  存" /> &nbsp;&nbsp; 
								<input id="returnBtn" type="button" onclick="returnButton()" value="返  回"/></td>
					</tr>
					<tr>
						<td colspan="4" align="center">&nbsp;</td>
					</tr>
				</table>

			</s:form>
		</div>
	
</body>
</html>
